package com.gnerv.sylvanas.framework.plugin.os;

import com.gnerv.sylvanas.framework.plugin.os.tools.OsTools;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class OsMemoryService {

    public long total() {
        return OsTools.totalMemory();
    }

    public long free() {
        return OsTools.freeMemory();
    }

    public long used() {
        return OsTools.totalMemory() -  OsTools.freeMemory();
    }

}
